<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>首页</title>
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>
    <link rel="stylesheet" href="../assets/materialize/css/materialize.min.css" media="screen,projection"/>
    <link href="../assets/css/bootstrap.css" rel="stylesheet"/>
    <link rel="stylesheet" href="../assets/css/layui.css" type="text/css"/>
    <!-- Custom Styles-->
    <link href="../assets/css/custom-styles.css" rel="stylesheet"/>
    <script src="../assets/js/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="../assets/js/bootstrap.file-input.js"></script>
    <script src="../assets/js/bootstrap.min.js"></script>
    <script src="../assets/js/manage_js/OtherSOF.js"></script>
    <script src="../assets/js/manage_js/SignVerifyFile.js"></script>
</head>
<body>
    <div id="page-wrapper">
        <div class="header">
            <h3 class="page-header">文件签名验签测试</h3>
            <ol class="breadcrumb">
                <li><a href="#">SOF接口测试</a></li>
                <li><a href="#">文件签名验签测试</a></li>
            </ol>
        </div>
        <div id="page-inner">
            <div class="row">
                <div class="col-md-12">
                    <div class="card">
                        <div class="card-action" id="card-action">文件签名验签</div>

                        <!--<div class="div-edit-head">
                            <p>添加账号</p>
                        </div>-->
                        <div id="div-add-content" style="margin-top: 30px;">
                            <div style="width:50%;float:left;margin-top:50px;" >
                                <div class="layui-form-item">
                                    <label class="layui-form-label">设置签名算法：</label>
                                    <select class="form-control" style="width:300px;"id="setSignMethod" onchange="setSignMethod()">
                                        <option >请选择</option>
                                        <option value="SGD_SM3_SM2">SM3SM2算法 </option>
                                        <option value="SGD_SHA1_RSA">Sha1RSA算法</option>
                                    </select>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">应用签名证书：</label>
                                    <div class="layui-input-block">
                                        <textarea style="height:90px;" id="getCert" style="width: 300px;"  class="layui-input"></textarea>
                                        <button class="layui-btn" onclick="getCert()">获取签名证书</button>
                                    </div>
                                </div>
                            </div>
                            <div style="width:50%;float:left;">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">文件签名：</label>
                                    <div class="layui-input-block">
                                        <!--<input type="file" id="fileSign" style="width: 300px; " class="btn btn-primary">
                                        <button class="layui-btn" onclick="signFile()">文件签名</button>-->
                                        <label for="fileSign" class="btn btn-default" >文件签名</label>  <div id="imgInfo"></div>
                                        <input id="fileSign" type="file" onchange="signFile()" style="display:none">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">数据签名值：</label>
                                    <div class="layui-input-block">
                                        <textarea style="height:90px;" id="signFileVal"   style="width: 300px;"  class="layui-input"></textarea>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">验证文件签名：</label>
                                    <div class="layui-input-block">
                                        <input type="text"id="valifySignFile"style="width: 300px;"  class="layui-input" readonly="readonly">
                                        <button class="layui-btn" onclick="valifySignFile()">验证文件签名</button>
                                    </div>
                                </div>
                            </div>
                            <div class="div-edit-button">
                                <span onclick="saveadd_oa()"><i class="fa fa-check-circle" aria-hidden="true"> </i></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <footer><p>Copyright &copy; 2021.All rights reserved.</p></footer>
    </div>
</body>
</html>